#ifndef DOUBAN_FMRADIO_MUSICINFO_H
#define DOUBAN_FMRADIO_MUSICINFO_H
#include <QObject>
namespace Douban
{
	class MusicInfo : public QObject
	{
		Q_OBJECT
		Q_PROPERTY(QString	album		READ album		WRITE setAlbum)
		Q_PROPERTY(QString	picture		READ picture	WRITE setPicture)
		Q_PROPERTY(bool		like		READ like		WRITE setLike)
		Q_PROPERTY(QString	title		READ title		WRITE setTitle)
		Q_PROPERTY(QString	albumtitle	READ albumTitle	WRITE setAlbumTitle)
		Q_PROPERTY(QString	url			READ url		WRITE setUrl)
		Q_PROPERTY(QString	artist		READ artist		WRITE setArtist)
		Q_PROPERTY(QString	sid			READ sid		WRITE setSid)
		Q_PROPERTY(QString	aid			READ aid		WRITE setAid)
		Q_PROPERTY(QString	subtype		READ subType		WRITE setSubType)
		Q_PROPERTY(QString	public_time	READ publicTime	WRITE setPublicTime)
		Q_PROPERTY(double	rating_avg	READ ratingAvg	WRITE setRatingAvg)
		Q_PROPERTY(QString	company		READ company	WRITE setCompany)

		public:
			MusicInfo():b_like(false),
						d_rating_avg(0){}
			virtual ~MusicInfo(){}

			QString album() const{return s_album;}
			void setAlbum(const QString& a){s_album = a;}

			QString picture() const{return s_picture;}
			void setPicture(const QString& p){s_picture = p;}

			bool like() const{return b_like;}
			void setLike(bool l){b_like = l;}

			QString title() const{return s_title;}
			void setTitle(const QString& t){s_title = t;}

			QString albumTitle() const{return s_albumtitle;}
			void setAlbumTitle(const QString& a){s_albumtitle = a;}

			QString url() const{return s_url;}
			void setUrl(const QString& u){s_url = u;}

			QString artist() const{return s_artist;}
			void setArtist(const QString& a){s_artist = a;}

			QString sid() const{return i_sid;}
			void setSid(QString s){i_sid = s;}

			QString aid() const{return i_aid;}
			void setAid(QString a){i_aid = a;}

			QString subType() const{return s_subtype;}
			void setSubType(const QString& s){s_subtype = s;}

			QString publicTime() const{return s_public_time;}
			void setPublicTime(const QString& p){s_public_time = p;}

			double ratingAvg() const{return d_rating_avg;}
			void setRatingAvg(double r){d_rating_avg = r;}

			QString company() const{return s_company;}
			void setCompany(const QString& c){s_company = c;}

			MusicInfo& operator=(const MusicInfo&);
			bool operator!=(const MusicInfo& rhs)const{return (this->i_sid != rhs.i_sid);}
			bool operator==(const MusicInfo& rhs)const{	return (this->i_sid == rhs.i_sid);}

		private:
			QString		s_album;
			QString		s_picture;
			bool		b_like;
			QString		s_title;
			QString		s_albumtitle;
			QString		s_url;
			QString		s_artist;
			QString		i_sid;
			QString		i_aid;
			QString		s_subtype;
			QString		s_public_time;
			double		d_rating_avg;
			QString		s_company;
	};

}

#endif /* MUSICINFO_H_ */
